@extends('home.login.layout')
@section('content')
<form action="{{url('/doLogin')}}" method="post">    
    <div class="login">
        <div class="wrap clearfix">
            <div class="fl"><a href="" target="_blank"><img width="666" height="418" src="{{url('/ho/imgs/9288698591814000.jpg')}}"></a></div>
            <div class="fr">
                <p class="right"></p>
                {{ csrf_field() }}
                <div class="login-main">
                    <p><strong>欢迎登录</strong><span>还没有账号？<a class="green" href="{{url('/reg')}}">立即注册</a></span></p>

                        <div id="msg-wrap"><div>
                            
                        @if (session('info'))
                        <span class="error" style="color:red;font-size:16px;text-align:center;">
                          <em>{{ session('info') }}</em>
                        </span>
                        @endif
                        </div></div>

                    <p>
                        <span class="input-phone-icon">&nbsp;</span>
                        <input class="input input-phone" id="UserName" name="email" placeholder="邮箱/账号/已验证手机" type="text" value="">
                    
                    </p>
                    <p>
                        <span class="input-key-icon">&nbsp;</span>
                        <input class="input input-key" id="Pwd" name="password" placeholder="密码" type="password">
                     
                    </p>
                    <p>
                        <input class="input input-key" id="VerifyCode" name="captcha" placeholder="验证码" style="width:100px" type="text" value="">
                        <img src="{{ URL('admin/captcha/1') }}" id="imgcode" onclick="javascript:re_captcha();">
                        <a href="javascript:re_captcha();" class="gray">换一张</a>
                    </p>
                    <p>
                        <label><input id="UserNameRemeber" name="UserNameRemeber" type="checkbox" value="true">自动登录
                        <input name="UserNameRemeber" type="hidden" value="false"> </label>
                        <span> <a class="gray" href="{{url('/home/forget')}}">忘记登录密码？</a>   
                        </span>
                    </p>
                    <p>
                        <button id="btnLogin" class="btn-green-l">登 &nbsp; 录</button>
                    </p>
                </div>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript">
    function re_captcha() {
        $url = "{{ URL('admin/captcha') }}";
            $url = $url + "/" + Math.random();
            document.getElementById('imgcode').src=$url;
      }
</script>
@endsection